home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
noweb
/
src
/
icon
/
defns.nw
< prev
next >
Wrap
Text File
|
1995-02-24
|
734b
|
34 lines
<<*>>=
procedure go()
local line
while line := read() do {
apply(prepass, line)
write(line)
apply(postpass, line)
}
end
procedure apply(pass, line)
line ? (="@" & pass(tab(upto(' ')|0), if =" " then tab(0) else &null))
end
@
[[indextext]] is a hack to introduce suitable ``[[@index nl]],'' but it
messes up the line counts!
<<*>>=
procedure writedefn(defn, locl)
static indextext
initial indextext := ""
if /defn then
*indextext > 0 & <<flush index>>
else {
if *indextext + *defn > 65 then <<flush index>>
write(if \locl then "@index localdefn" else "@index defn ", defn)
indextext ||:= " " || defn
}
return
end
<<flush index>>=
{ # write("@index nl") # don't!
indextext := ""
}